var app = angular.module('myApp',[]);
app.controller('updateController',['$scope','$http',function ($scope,$http) {
    $scope.user =  {
        id:1,
        username:'zhangsan',
        password:'dyg123',
        nickname:'张大大',
        enable:1
    }

    $scope.update = function (user) {
        $scope.updateuser = angular.copy(user);
        $http.post('/update',user).then(function (value) {
            alert(value);
        });
    }

}]);